package com.patMall.service;

import com.patMall.entity.Commodity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author 750909637@qq.com
 * @PackageName patMall
 * @Package com.patMall.service
 * @Date 2024/1/10 15:08
 * @Version 1.0
 */
public interface CommodityService {
    List<Commodity> selectAllByCommodity(int state);
    List<Commodity> selectAllCommodity();
    Commodity getCommodityId(Integer commodityId);
    Commodity getCommodityByCommodityId(Commodity commodity);
    int addCommodity(Commodity commodity);
    int updateCommodity(Commodity commodity);
    int deleteCommodity(Integer commodityId);
    List<Commodity> getAllByCommodityName(String commodityName);
    List<Commodity> searchCommodity(Commodity commodity);
    /**
    * 查询商店，
    * storeId  ID
    * sorting_p 价格排序 降序 1 升序 2
    * sorting_t 时间排序 降序 1 升序 2
    * */
    List<Commodity> getStoreCommodityAll(Integer storeId, int sorting_p,int sorting_t);
    /**
     * 商店中随机十条商品
     * */
    List<Commodity> getStoreCommodity();
}
